
import { Entity, NgField, NgObject, EntityList, NgList, NgDynamic, DynamicEntity, NgEntity } from '@farris/devkit';
import { NewObject1Entity } from './newobject1entity';
import { NewObject2Entity } from './newobject2entity';

@NgEntity({
    originalCode: "clzx",
    nodeCode: "clzxs"
})
export class ClzxEntity extends Entity {

    @NgField({
        originalDataField: 'ID',
        dataField: 'id',
        primary: true,
        originalDataFieldType: 'String',
        initValue: '',
        path: 'ID',

        validRules: [
            {
                type: 'required',
                constraints: [true],
            },
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    id: string;

    @NgField({
        originalDataField: 'Version',
        dataField: 'version',
        originalDataFieldType: 'DateTime',
        initValue: '0001-01-01T00:00:00',
        path: 'Version',
        enableTimeZone: true,
    })
    version: string;

    @NgField({
        originalDataField: 'EmployeeID',
        dataField: 'employeeID',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'EmployeeID',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    employeeID: string;

    @NgField({
        originalDataField: 'DomainID',
        dataField: 'domainID',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'DomainID',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    domainID: string;

    @NgField({
        originalDataField: 'BillCode',
        dataField: 'billCode',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'BillCode',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    billCode: string;

    @NgField({
        originalDataField: 'TotalSum',
        dataField: 'totalSum',
        originalDataFieldType: 'Number',
        initValue: 0,
        path: 'TotalSum',
    })
    totalSum: any;

    @NgField({
        originalDataField: 'BillType',
        dataField: 'billType',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'BillType',

        validRules: [
            {
                type: 'maxLength',
                constraints: [1],
                message: '最大长度为1',
            }
        ]
    })
    billType: string;

    @NgField({
        originalDataField: 'BillDate',
        dataField: 'billDate',
        originalDataFieldType: 'DateTime',
        initValue: '0001-01-01T00:00:00',
        path: 'BillDate',
        enableTimeZone: true,
    })
    billDate: string;

    @NgField({
        originalDataField: 'ProjectID',
        dataField: 'projectID',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'ProjectID',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    projectID: string;

    @NgField({
        originalDataField: 'BillNote',
        dataField: 'billNote',
        originalDataFieldType: 'Text',
        initValue: '',
        path: 'BillNote',
    })
    billNote: any;

    @NgField({
        originalDataField: 'ProjectMrg',
        dataField: 'projectMrg',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'ProjectMrg',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    projectMrg: string;

    @NgField({
        originalDataField: 'FileInfo',
        dataField: 'fileInfo',
        originalDataFieldType: 'Text',
        initValue: '',
        path: 'FileInfo',
    })
    fileInfo: any;

    @NgField({
        originalDataField: 'BillDetailDate',
        dataField: 'billDetailDate',
        originalDataFieldType: 'DateTime',
        initValue: '0001-01-01T00:00:00',
        path: 'BillDetailDate',
        enableTimeZone: true,
    })
    billDetailDate: string;

    @NgField({
        originalDataField: 'BillDetailAmount',
        dataField: 'billDetailAmount',
        originalDataFieldType: 'Number',
        initValue: 0,
        path: 'BillDetailAmount',
    })
    billDetailAmount: any;

    @NgField({
        originalDataField: 'BillDetailNote',
        dataField: 'billDetailNote',
        originalDataFieldType: 'Text',
        initValue: '',
        path: 'BillDetailNote',
    })
    billDetailNote: any;

    @NgField({
        originalDataField: 'InvoiceNO',
        dataField: 'invoiceNO',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'InvoiceNO',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    invoiceNO: string;

    @NgField({
        originalDataField: 'XSDW',
        dataField: 'xsdw',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'XSDW',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    xsdw: string;

    @NgField({
        originalDataField: 'BZ',
        dataField: 'bz',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'BZ',

        validRules: [
            {
                type: 'maxLength',
                constraints: [10],
                message: '最大长度为10',
            }
        ]
    })
    bz: string;

    @NgField({
        originalDataField: 'Code',
        dataField: 'code',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Code',

        validRules: [
            {
                type: 'maxLength',
                constraints: [100],
                message: '最大长度为100',
            }
        ]
    })
    code: string;

    @NgField({
        originalDataField: 'Remark',
        dataField: 'remark',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Remark',

        validRules: [
            {
                type: 'maxLength',
                constraints: [1000],
                message: '最大长度为1000',
            }
        ]
    })
    remark: string;

    @NgField({
        originalDataField: 'State',
        dataField: 'state',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'State',

        validRules: [
            {
                type: 'maxLength',
                constraints: [22],
                message: '最大长度为22',
            }
        ]
    })
    state: string;

    @NgField({
        originalDataField: 'Organization',
        dataField: 'organization',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Organization',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    organization: string;

    @NgField({
        originalDataField: 'Gender',
        dataField: 'gender',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Gender',

        validRules: [
            {
                type: 'maxLength',
                constraints: [22],
                message: '最大长度为22',
            }
        ]
    })
    gender: string;

    @NgField({
        originalDataField: 'CountryOrArea',
        dataField: 'countryOrArea',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'CountryOrArea',

        validRules: [
            {
                type: 'maxLength',
                constraints: [22],
                message: '最大长度为22',
            }
        ]
    })
    countryOrArea: string;

    @NgField({
        originalDataField: 'Location',
        dataField: 'location',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Location',

        validRules: [
            {
                type: 'maxLength',
                constraints: [22],
                message: '最大长度为22',
            }
        ]
    })
    location: string;

    @NgField({
        originalDataField: 'IDNumber',
        dataField: 'idNumber',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'IDNumber',

        validRules: [
            {
                type: 'maxLength',
                constraints: [18],
                message: '最大长度为18',
            }
        ]
    })
    idNumber: string;

    @NgField({
        originalDataField: 'AccontName',
        dataField: 'accontName',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'AccontName',

        validRules: [
            {
                type: 'maxLength',
                constraints: [200],
                message: '最大长度为200',
            }
        ]
    })
    accontName: string;

    @NgField({
        originalDataField: 'YF',
        dataField: 'yf',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'YF',

        validRules: [
            {
                type: 'maxLength',
                constraints: [1],
                message: '最大长度为1',
            }
        ]
    })
    yf: string;

    @NgField({
        originalDataField: 'Amount',
        dataField: 'amount',
        originalDataFieldType: 'Number',
        initValue: 0,
        path: 'Amount',
    })
    amount: any;

    @NgField({
        originalDataField: 'Note',
        dataField: 'note',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Note',

        validRules: [
            {
                type: 'maxLength',
                constraints: [2000],
                message: '最大长度为2000',
            }
        ]
    })
    note: string;

    @NgField({
        originalDataField: 'jszt',
        dataField: 'jszt',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'jszt',

        validRules: [
            {
                type: 'maxLength',
                constraints: [1],
                message: '最大长度为1',
            }
        ]
    })
    jszt: string;

    @NgList({
        dataField: 'newObject1s',
        originalDataField: '',
        type: NewObject1Entity

    })

    newObject1s: EntityList<NewObject1Entity>;
    @NgList({
        dataField: 'newObject2s',
        originalDataField: '',
        type: NewObject2Entity

    })

    newObject2s: EntityList<NewObject2Entity>;
}